
import request from '@/api/myRequest'
//订单列表
function orderList(start, limit, data) {
  return request({
      url: `/lejuAdmin/order/findOrdersByPage/${start}/${limit}`, // 相对路径
      method: 'post',
      data
  })
}
//退单列表
function orderBackList(start, limit, data) {
  return request({
      url: `/lejuAdmin/orderReturn/findReturnApply/${start}/${limit}`, // 相对路径
      method: 'post',
      data
  })
}
//查看订单明细
function orderDetail(orderId) {
  return request({
      url: `/lejuAdmin/order/orderDetail/${orderId}`, // 相对路径
      method: 'get'
  })
}
// 强制确认收货
function forceFinishOrder(orderId) {
  return request({
      // url: `/lejuAdmin/order/sendDone?orderId=1319204625171681282&deliverySn='123456'&deliveryCompany='顺丰'`, // 相对路径
      url: `/lejuAdmin/order/receiveProductsForce/${orderId}`, // 相对路径
      method: 'post'

  })
}
//确认发货
function sendOrder(data) {
  return request({
      // url: `/lejuAdmin/order/sendDone?orderId=1319204625171681282&deliverySn='123456'&deliveryCompany='顺丰'`, // 相对路径
      url: `/lejuAdmin/order/sendDone`, // 相对路径
      method: 'post',
      data
  })
}
//关闭订单
function finishOrder(orderId) {
  return request({
      // url: `/lejuAdmin/order/sendDone?orderId=1319204625171681282&deliverySn='123456'&deliveryCompany='顺丰'`, // 相对路径
      url: `/lejuAdmin/order/finishOrder/${orderId}`, // 相对路径
      method: 'post'

  })
}
//退单明细
function orderBackDetail(id) {
  return request({
      url: `/lejuAdmin/orderReturn/${id}`, // 相对路径
      method: 'get'
  })
}
export default {
  orderDetail,
  orderList,
  orderBackList,
  forceFinishOrder,
  sendOrder,
  orderBackDetail
}